package com.books.adapter

import android.view.View
import android.webkit.WebView

import com.blankj.utilcode.util.LogUtils
import com.books.R
import com.books.model.BookHomeListModel
import com.books.model.BookInfoModel
import com.books.model.BookReadDataModel
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder

import com.tencent.liteav.demo.superplayer.ui.view.base.BaseAdapter

import pic.PicLoadManager

class BookReadAdapter(private val layoutRes: Int) :
    BaseQuickAdapter<BookReadDataModel.DataBean, BaseViewHolder>(layoutRes) {

//    var webView: WebView? = null

    override fun convert(helper: BaseViewHolder, item: BookReadDataModel.DataBean) {

        var webView = helper.itemView.findViewById<WebView>(R.id.webView) as WebView
        // 启用JavaScript
        webView.settings.javaScriptEnabled = true
        // 加载网页
        webView.loadData(item.text, "text/html", "UTF-8")

//       webView.loadUrl( item.text);


    }




}




